// src/router/index.ts
import { createRouter, createWebHashHistory } from 'vue-router';
import MovieList from '../views/MovieList.vue';
import MovieDetail from '../views/MovieDetail.vue';

const routes = [
  { path: '/', component: MovieList, meta: { keepAlive: true } },
  { path: '/movie/:name', name: 'movieDetail', component: MovieDetail, props: true },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,

});

export default router;
